#include<stdio.h>
#include<unistd.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>

int main()
{
	int fd = open("./op_data", O_RDONLY);
//	int fd2 = open("./data", O_RDONLY);
	int *x;
	int rd = 1;
	printf("\nop_data file\n");
	while(rd > 0)
	{
		rd = read(fd, x, sizeof(int));
		if(rd > 0)
		printf("%d\n", *x);
	}
	/*
	printf("\ndata file\n");
	while(rd2 > 0)
	{
		rd2 = read(fd2, y, sizeof(int));
		printf("%d\n", *y);
	} */
	return 0;
}
